<?php
/***************************************************************
*  Copyright notice
*  (c) 2009, jianyuzhu@gmail.com
*  All rights reserved
*  This script is part of the PPEMI project.
***************************************************************/

//
include_once(CONFIG_PATH . CONFIG_DIR_CLASSES . 'frontend.main.class.php');
$feObj = new FrontendMainBase();

//
include_once(CONFIG_PATH . CONFIG_DIR_CLASSES . 'module/gallery/gallery.album.class.php');
$maObj = new GalleryAlbumBase();
$maObj->format = true;

include_once(CONFIG_PATH . CONFIG_DIR_CLASSES . 'module/gallery/gallery.image.class.php');
$mObj = new GalleryImageBase();
$mObj->format = true;

$album = $maObj->getItem(1);
$items = $mObj->getItems(array('aid:=' => $album['id']), 0, false);

//
$feObj->content_wrap['mainpart'] = 'album';
$feObj->content_wrap['album'] = $album;
$feObj->content_wrap['items'] = $items;

//
echo $feObj->display('common/blocks/common_block_album.tpl');
//
?>